package com.yuw.fun;

public class Test02 {

	public static void main(String[] args) {
		// 重载方法调用
		String strF = "林黛玉"; // 实参
		double money = 1000; // 实参
		// shopping("林黛玉", 1000); // 匿名变量的实参列表
		shopping(strF, money);
	}

	/**
	 * 购物
	 */
	private static void shopping() {
		System.out.println("I am shopping..");
	}

	/**
	 * 购物
	 * 
	 * @param strFrieds
	 *            形参
	 */
	private static void shopping(String strFrieds) {
		System.out.println("I am shopping with " + strFrieds);
	}

	/**
	 * 购物
	 * 
	 * @param strFrieds
	 *            形参
	 */
	private static void shopping(double costMoney) {
		System.out.println("I am shopping with money of " + costMoney);
	}

	/**
	 * 购物
	 * 
	 * @param strFrieds
	 * @param costMoney
	 */
	private static void shopping(String strFrieds, double costMoney) {
		System.out.println("I am shopping with girlfriend " + strFrieds + ",and costing Money of " + costMoney);
	}

	/**
	 * 购物
	 * 
	 * @param strFrieds
	 * @param costMoney
	 */
	private static void shopping(double costMoney, String strFrieds) {
		System.out.println("I am shopping with boyfriend " + strFrieds + ",and costing Money of " + costMoney);
	}

	/**
	 * 购物
	 * 
	 * @param strFrieds
	 * @param costMoney
	 */
	public static String shopping(String strFrieds, String strFrieds2) {
		System.out.println("I am shopping with friend " + strFrieds + ", " + strFrieds2);
		return "";
	}

	/**
	 * 购物
	 * 
	 * @param strFrieds
	 * @param costMoney
	 */
	// 形参列表都是同一种类型时，顺序不同构不成重载；
	// private static void shopping( String strFrieds2,String strFrieds) {
	// System.out.println("I am shopping with friend " + strFrieds + ", " +
	// strFrieds2);
	// }
}
